<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:p="http://primefaces.org/ui"
                template="/templates/ui.xhtml">

    <ui:define name="head">
        <style type="text/css">
            .prdsetColumn {
                width: 100%;
            }
        </style>
    </ui:define>
    <ui:define name="content">
        <div style="margin:5px">
            <p:tabView style="font-weight:normal;font-style:normal">
                <p:tab title="当前系统状态">
                    <p:dataTable id="pdt1" style="width:100%;"
                                 dynamic="true" selectionMode="single"
                                 value="#{sysCtrlAction.contractList}" var="record"
                                 paginatorTemplate="{FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
                                 paginator="true" rows="5" paginatorPosition="bottom"
                                 rowsPerPageTemplate="100,50,30,15,5" rowKey="pkid"
                                 emptyMessage="数据记录为空...">
                        <f:facet name="header">未发送合同收款记录</f:facet>
                        <p:column style="display:none;" headerText="pkid">
                            <h:outputText value="#{record.pkId}"/>
                        </p:column>
                        <p:column headerText="合同号" style="text-align:center">
                            <h:outputText value="#{record.contractNo}"/>
                        </p:column>
                        <p:column headerText="监管账户名" style="text-align:center">
                            <h:outputText value="#{record.accountName}"/>
                        </p:column>
                        <p:column headerText="监管帐号" style="text-align:center">
                            <h:outputText value="#{record.accountCode}"/>
                        </p:column>
                        <p:column headerText="买方姓名" style="text-align:center">
                            <h:outputText value="#{record.buyerName}"/>
                        </p:column>
                        <p:column headerText="房屋类型" style="text-align:center">
                            <h:outputText value="#{rsContractAction.houseType.valueOfAlias(record.houseType).title}"/>
                        </p:column>
                        <p:column headerText="房款总价">
                            <h:outputText value="#{record.totalAmt}" style="float: right">
                                <f:convertNumber type="number" pattern="#,###,###,###,##0.00"/>
                            </h:outputText>
                        </p:column>
                        <p:column headerText="交易状态" style="text-align:center">
                            <h:outputText
                                    value="#{rsContractAction.contractStatus.valueOfAlias(record.statusFlag).title}"/>
                        </p:column>
                    </p:dataTable>
                    <p:separator/>
                    <p:dataTable id="pdt2" style="width:100%;"
                                 dynamic="true" selectionMode="single"
                                 value="#{sysCtrlAction.planCtrlList}" var="record"
                                 paginatorTemplate="{FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
                                 paginator="true" rows="5" paginatorPosition="bottom"
                                 rowsPerPageTemplate="100,50,30,15,5" rowKey="pkid"
                                 emptyMessage="数据记录为空...">
                        <f:facet name="header">未发送计划付款记录</f:facet>

                        <p:column style="display:none;" headerText="pkid">
                            <h:outputText value="#{record.pkId}"/>
                        </p:column>
                        <p:column headerText="账户名称">
                            <h:outputText value="#{record.companyName}"/>
                        </p:column>

                        <p:column headerText="监管账号" style="text-align:center">
                            <h:outputText value="#{record.accountCode}"/>
                        </p:column>

                        <p:column headerText="计划控制编号" style="text-align:center">
                            <h:outputText value="#{record.planCtrlNo}"/>
                        </p:column>

                        <p:column headerText="计划日期" style="text-align:center">
                            <h:outputText value="#{record.planDate}">
                            </h:outputText>
                        </p:column>

                        <p:column headerText="用款说明">
                            <h:outputText value="#{record.planDesc}"/>
                        </p:column>

                        <p:column headerText="对方账户名">
                            <h:outputText value="#{record.toAccountName}"/>
                        </p:column>
                        <p:column headerText="对方账号">
                            <h:outputText value="#{record.toAccountCode}"/>
                        </p:column>
                        <p:column headerText="对方账户开户行">
                            <h:outputText value="#{record.toHsBankName}"/>
                        </p:column>
                        <p:column headerText="计划金额">
                            <h:outputText value="#{record.plAmount}" style="float: right">
                                <f:convertNumber pattern="#,###,###,##0.00"/>
                            </h:outputText>
                        </p:column>
                        <p:column headerText="付款标志">
                            <h:outputText value="#{rsPlanCtrlAction.adjustFlag.valueOfAlias(record.adjustFlag).title}"/>
                        </p:column>

                    </p:dataTable>
                    <p:separator/>
                    <p:dataTable id="pdt3" style="width:100%;"
                                 dynamic="true"
                                 value="#{sysCtrlAction.sendLogList}" var="record"
                                 paginatorTemplate="{FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
                                 paginator="true" rows="5" paginatorPosition="bottom"
                                 rowsPerPageTemplate="100,50,30,15,5"
                                 emptyMessage="数据记录为空...">
                        <f:facet name="header">系统交易发送日志[当月]</f:facet>
                        <p:column headerText="操作日期" style="text-align:center">
                            <h:outputText
                                    value="#{record.sysDate}"/>
                        </p:column>
                        <p:column headerText="交易运行日期" style="text-align:center">
                            <h:outputText
                                    value="#{record.txnDate}">
                            </h:outputText>
                        </p:column>
                        <p:column headerText="交易名称" style="text-align:left">
                            <h:outputText
                                    value="#{record.txnNam}"/>
                        </p:column>
                        <p:column headerText="交易码" style="text-align:center">
                            <h:outputText
                                    value="#{record.txnCode}"/>
                        </p:column>
                        <p:column headerText="交易结果" style="text-align:center">
                            <h:outputText
                                    value="#{sysCtrlAction.sendLogResult.valueOfAlias(record.txnResult).title}"/>
                        </p:column>
                    </p:dataTable>

                </p:tab>
            </p:tabView>
        </div>
    </ui:define>
</ui:composition>